from selenium.webdriver.common.by import By

from utils.base_aolai import BaseObject


class IPAMObject(BaseObject):
    def __init__(self):
        super().__init__()
        self.ipam = (By.ID, 'com.yunmall.lc:id/address_add_new_btn')

    def findIpam(self):
        return self.search_ele(self.ipam)


class IpamHandle:
    def __init__(self):
        self.io = IPAMObject()

    def ipam_click(self):
        self.io.findIpam().click()


class IpamTask:
    ih = IpamHandle()

    @classmethod
    def new_ipam(cls):
        cls.ih.ipam_click()
